<?php
/**
 * Patient Signal view page, render subpages into tabs. Used in view action in PatientSignalController.
 *
 * @package   views
 * @subpackage patientSignal
 * @since     1.0
 * @filesource
 */
$this->breadcrumbs=array(
	'Patient Signals'=>array('index'),
	$model->subject,
);

$patientSignalEditable=$model->isEditable();

$this->menu=array(
	array('label'=>'List Patient Signals', 'url'=>array('index')),
	array('label'=>'Create Patient Signal', 'url'=>array('upload'),
		'visible'=>Yii::app()->user->checkAccess('signalCreate',array('organizationId'=>$model->organizationId))),
	array('label'=>'Update Patient Signal', 'url'=>array('update', 'id'=>$model->id),
		'visible'=>$patientSignalEditable&&Yii::app()->user->checkAccess('signalUpdate',array('organizationId'=>$model->organizationId))),
	array('label'=>'Delete Patient Signal', 'url'=>'#', 'linkOptions'=>array(
				'submit'=>array('delete','id'=>$model->id),
				'confirm'=>"Are you sure you want to delete this signal record? \n The related files will be deleted!",
				'csrf'=>'true',),
		'visible'=>$patientSignalEditable&&Yii::app()->user->checkAccess('signalDelete',array('organizationId'=>$model->organizationId))
	),
//	array('label'=>'Manage PatientSignal', 'url'=>array('admin')),
);
?>

<h1>View Patient Signal - <?php echo $model->subject; ?></h1>
<div class="signal-toolbar">
<?php 
if($patientSignalEditable&&Yii::app()->user->checkAccess('signalUpdate',array('organizationId'=>$model->organizationId))){
	echo CHtml::link('Update',array('update','id'=>$model->id),array('class'=>'icon icon-report-edit'));
	echo CHtml::link('Update Files',array('updateFiles','id'=>$model->id),array('class'=>'icon icon-report-edit'));
}
if($patientSignalEditable&&Yii::app()->user->checkAccess('signalDelete',array('organizationId'=>$model->organizationId))){
	echo CHtml::link('Delete',array('update','id'=>$model->id),array(
				'class'=>'icon icon-report-delete',	
				'submit'=>array('delete','id'=>$model->id),
				'confirm'=>"Are you sure you want to delete this signal record? \n The related files will be deleted!",
				'csrf'=>'true',
	));
}
?>
</div>
<?php	
$this->widget('zii.widgets.jui.CJuiTabs', array(
    'tabs'=>array(
        'Basic Info'=>$this->renderPartial('view1',array('model'=>$model), true),
        'Subject Info'=>$this->renderPartial('view2',array('model'=>$model), true),
        'Treatment History'=>$this->renderPartial('view3',array('model'=>$model), true),
        'Other Info'=>$this->renderPartial('view4',array('model'=>$model), true),
        'Files'=>$this->renderPartial('view5',array('model'=>$model), true),
),
// additional javascript options for the tabs plugin
    'options'=>array(
        'collapsible'=>false,
	),
));
?>